<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>杨澎锴的时间练习19——事件练习</title>
  </head>
  <body>
    <header><h1>监听事件</h1></header>
    <main>
      <section><p id="example">点击我，很好看</p></section>
      <section>
        <!-- <p keydown="'s',console.log('我就是很棒'))">点我也不错哦</p> -->
      </section>
    </main>
    <footer></footer>
    <script>
      p = document.getElementById("example");
      p.onclick = function () {
        console.log("点我很精彩");
      };
    </script>
  </body>
</html>
